package cn.com.duiba.millionaire.center.biz.remoteservice;

import cn.com.duiba.millionaire.center.api.enums.AppConfigProNameEnum;
import cn.com.duiba.millionaire.center.api.remoteservice.RemoteMillionaireAppConfigService;
import cn.com.duiba.millionaire.center.biz.service.MillionaireAppConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Created by sunchangji on 2018/2/24.
 */
@RestController
public class RemoteMillionaireAppConfigServiceImpl implements RemoteMillionaireAppConfigService {
    @Autowired
    private MillionaireAppConfigService millionaireAppConfigService;

    @Override
    public List<Long> findAppIdByPropName(AppConfigProNameEnum proNameEnum) {
        return millionaireAppConfigService.findAppIdByPropName(proNameEnum.getPropName());
    }

    @Override
    public boolean batchInsert(List<Long> appIds, String propName) {
        return millionaireAppConfigService.batchInsert(appIds,propName)>0;
    }

    @Override
    public boolean deleteByIds(List<Long> appIds) {
        return millionaireAppConfigService.deleteByIds(appIds)>0;
    }

}
